/*    */ package com.newcrm.webapi.sub;
/*    */ 
/*    */ import com.newcrm.bean.User;
/*    */ import com.newcrm.db.VOIPCallManager;
/*    */ import com.newcrm.exception.NotFoundException;
/*    */ import com.newcrm.util.Util;
/*    */ import com.newcrm.webapi.AbstractAction;
/*    */ import com.newcrm.webapi.AbstractHttpServlet;
/*    */ import java.io.IOException;
/*    */ import java.io.PrintWriter;
/*    */ import java.util.List;
/*    */ import javax.servlet.ServletException;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ import net.sf.json.JSONObject;
/*    */ 
/*    */ public class ListCallRecords extends AbstractAction
/*    */ {
/*    */   public ListCallRecords(AbstractHttpServlet servlet)
/*    */   {
/* 26 */     super(servlet);
/*    */   }
/*    */ 
/*    */   public void parse(HttpServletRequest request, HttpServletResponse response)
/*    */     throws IOException, ServletException, NotFoundException
/*    */   {
/* 33 */     String telephones = Util.getURLParameter(request
/* 34 */       .getParameter("telephones"));
/*    */ 
/* 36 */     VOIPCallManager manager = new VOIPCallManager();
/*    */ 
/* 38 */     List result = manager.getCallRecords(telephones, 
/* 39 */       super.getLoginUser(request).companyId);
/* 40 */     response.setContentType("text/html;charset=utf-8");
/* 41 */     PrintWriter out = response.getWriter();
/* 42 */     JSONObject jsonObject = new JSONObject();
/* 43 */     jsonObject.put("error", "0");
/* 44 */     jsonObject.put("callRecords", result);
/* 45 */     out.println(jsonObject);
/* 46 */     out.flush();
/* 47 */     out.close();
/*    */   }
/*    */ }

/* Location:           C:\E\referenceProject\CRM参考\qikebao\WEB-INF\lib\qikebao.jar
 * Qualified Name:     com.newcrm.webapi.sub.ListCallRecords
 * JD-Core Version:    0.6.1
 */